﻿using Orchard.Localization;
using Orchard.UI.Navigation;

namespace Redirect404
{
    public class AdminMenu : INavigationProvider
    {
        public Localizer T { get; set; }

        public string MenuName { get { return "admin"; } }

        public void GetNavigation(NavigationBuilder builder)
        {
            builder.AddImageSet("navigation")
                .Add(T("Redirects"), "8",
                    menu => menu.Add(T("Redirect"), "0", item => item.Action("Index", "Admin", new { area = "Redirect404" })
                            .Permission(Permissions.ManageRedirects)));
        }
    }
}